<extend name="./Common/View/Public/list.html" />

<block name="page_title">用户列表</block>
<block name="search">
    <div class="layui-input-inline">
        <select name="project_id" id="project_id" lay-filter="project_id" api="rate/project/slist" empty="项目"></select>
    </div>
    <div class="layui-input-inline">
        <select name="type" id="type" lay-filter="type" api="sys/Dict/info/code/RATE_USER_TYPE" empty="参与类型"></select>
    </div>
    <div class="layui-input-inline">
        <input class="layui-input" name="keywords" autocomplete="off" placeholder="姓名" />
    </div>
</block>

<block name="toolbar">
    {:W('Todo/UI/toolbar',array('参评用户',array('add','delete','imports')))}
</block>

<block name="main">
    <script type="text/javascript">
        var list = {api:"{$Think.const.MODULE_NAME}/{$Think.const.CONTROLLER_NAME}/"};
        list.columns =  [[
            {checkbox: true, fixed: true}
            , {field:'project_id', minWidth:100, title : '项目名称', templet: '#tpl_project'}
            , {field: 'name', title: '参与用户姓名', minWidth: 110}
            , {field: 'type', title: '参与方式', width: 120, templet: '#tpl_type'}
            ,{fixed: 'right', minWidth:80, align:'center', toolbar: '#tpl_bar'}
        ]];
    </script>
    <script type="text/html" id="tpl_bar">
        {{ format_optbar(['delete']) }}
    </script>
    <script type="text/html" id="tpl_project">
        {{ format_data_project(d.project_id) }}
    </script>
    <script type="text/html" id="tpl_type">
        {{ format_rate_user_type(d.type) }}
    </script>
</block>
<block name="script">
    <script src="/api/Rate/Project/format"></script>
</block>